// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
import store from './store/index.js'
import Utils from './utils/utils.js'
import TipToast from './utils/tipToast.js'
import Background from './configure/components/basic-bj/index'
import BasicPopup from './configure/components/base-popup/index'
import ProductItem from './configure/components/product-item/index'

Vue.prototype.$utils = Utils
Vue.prototype.$tip = TipToast

Vue.config.productionTip = false
Vue.component('Background', Background)
Vue.component('BasicPopup', BasicPopup)
Vue.component('ProductItem', ProductItem)

App.mpType = 'app'

const app = new Vue({
    ...App,
    store
})

app.$mount()
// #endif

// #ifdef VUE3
import {createSSRApp} from 'vue'
import App from './App.vue'
import Utils from './utils/utils.js'
import TipToast from './utils/tipToast.js'
import store from './store'

export function createApp() {
    const app = createSSRApp(App)
    app.use(store)

    // 全局挂载工具类和提示函数
    app.config.globalProperties.$utils = Utils
    app.config.globalProperties.$tip = TipToast

    return {
        app
    }
}

// #endif